Proficiency in the use of RubyGemsRubyGems is a Ruby plug-in management system that allows you to easily install and manage Ruby library functions. All open source kits can be found on the rubygems.
# # #常见指令
Gem-v View the version of
Transferred from: http://www.jianshu.com/p/728184da1699Gem Introduction:Gem is a standard package for managing Ruby libraries and programs, and it is easy to find, install, upgrade, and uninstall packages through Ruby Gems such as
Ruby Gem command and rubygem command
I. Introduction
Gem is a standard package for managing Ruby libraries and programs. It is very convenient to find, install, upgrade, and uninstall software packages through Ruby Gem (such as http://rubygems.org/)
Ruby-v # view the ruby VERSION ruby-e '''require "watir"; puts Watir: IE: version'' # view the watir VERSION
Rvm list known # list known ruby versions
Rvm install 1.9.3
Rvm use 1.9.3 | rvm use system
Rvm use 1.9.3 -- default
Rvm list # list local
Ruby-v #查看ruby version ruby-e ' require ' watir; Puts Watir::ie::version ' #查看watir版本
RVM list Known #列出已知的ruby版本
RVM Install 1.9.3
RVM Use 1.9.3 | RVM Use System
RVM Use 1.9.3--default
RVM List #列出本地ruby版本
RVM Remove 1.9.2
See RVM Practical
Tutorial on creating a custom Ruby gem package, rubygem
Write a simple example
1. Create the following folder
Note: The lib directory must have a rb file with the same name as your gem.
Copy codeThe Code is as follows:$ Cd hola$ Tree.├ ── Hola.
Gem Common commands
Gem-v # View version of RubyGems software
gem help #显示RubyGem使用帮助
Gems help Example #列出RubyGem命令一些使用范例
gem install [gemname] # ann Install the specified gem package, the program will first find the GEM package from this
Write one of the simplest examples
1. Build the following folder
Note: The Lib directory must have a RB file that is the same as your gem name.
Copy Code code as follows:
$ CD Hola
$ tree
.
├──hola.gemspec
└──lib
└──hola.
The customer's server is Ubuntu + apache2 + ruby on rails. Currently, some pages on the customer's server always report the 500 error. The ruby language is only known and has not been studied in depth. I have never set up a ruby server environment,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.